<style scoped="scoped" lang="scss">
$color: #29c8a1;
.header {
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 65px;
  overflow: hidden;
  position: fixed;
  z-index: 22;
  width: 100%;
  top: 0;
  left: 0;
  .name {
    display: flex;
    align-items: center;
    font-size: 12px;
  }
  .fr {
    display: flex;
    width: 50%;
    align-items: center;
    .el-button--primary {
      background-color: $color;
      border-color: $color;
    }
  }
}
</style>
<template>
  <section class="header">
    <div class="name">
      <img src="../assets/imgs/logo.png" alt="logo" width="30px" height="30px" />
      <h4>页面自定义管理系统</h4>
    </div>
    <div class="fr">
      <el-button
        type="success"
        icon="el-icon-view"
        @click="$parent.showPreview = true"
        >预览</el-button
      >
      <el-button type="primary" @click="save" icon="el-icon-circle-check"
        >保存并使用</el-button
      >
    </div>
  </section>
</template>

<script>
export default {
  name: "Header",
  methods: {
    save() {
      this.$parent.saveConfirm = true;
    },
  },
};
</script>
